<!--#include file="Config.asp" -->

<%
LanguageType=Trim(Request("LanguageType"))
LanguageDegree=Trim(Request("LanguageDegree"))
LanguageId =Int(Request("LanguageId"))
ActionType=Trim(Request("ActionType"))

'增加记录
If ActionType="Add" Then
	If LanguageType = "" Or IsNull(LanguageType) Then
	ShowMsg="请输入语种"
	End If
	If LanguageDegree = "" Or IsNull(LanguageDegree) Then
	ShowMsg="请选择掌握程度"
	End If

	Conn.Execute("insert into LanguageTbl (LanguageType , LanguageDegree , PerId) values ('"& LanguageType &"' , '"& LanguageDegree &"' , "& session("AnyPIM_userID") &")")
	Conn.Execute("update Users set yyFlag = '1' where PerId = "& session("AnyPIM_userID"))
End If

'删除记录
If ActionType="Del" Then
Conn.Execute("delete  from LanguageTbl where LanguageId = "& LanguageId &" and PerId = "& session("AnyPIM_userID"))
Rs.Open "select * from LanguageTbl where PerId = "& session("AnyPIM_userID") , Conn , 1 , 1
If Rs.Eof Then
	Conn.Execute("update Users set yyFlag = '0' where PerId = "& session("AnyPIM_userID"))
End If
Rs.Close
End If

response.redirect "LanguageAbilities.asp"
%>
